#ifndef __main_h
#define __main_h

 #define D_1s         250   //1s
	#define D_40ms       10    //40ms
	//#define D_300ms   16 //300ms
	#define D_500ms      125     //500ms
	 #define D_1m        2//64
	#define D_5s    5
	#define D_1h   60
	
	
	#define  D_PaoDou  1
	#define  D_ZhengDou 2
	#define  D_FaJiao  3
	#define  D_GeShuiDun 4
	
	#define D_Function 1
	#define D_Jian  2
	#define D_Jia   3
	#define D_OnOff 4
#ifdef __main_c
uint8_t timer40ms;
uint8_t timer500ms;
uint8_t timer1s;
uint8_t clockAddTime;
uint8_t  timer1m;
int8_t function;
bit bSecFlash500ms;
uint8_t flashFunctionTime;
bit bPowerOnOff;
bit bFunctionSure;
uint16_t workTime;
uint16_t minWorkTime;
uint16_t maxWorkTime;
uint8_t longKeyHoldTime;
uint8_t longKeyValue;
bit bKeyTemp;
uint8_t keyValueNum;
uint8_t holdKeyValue;
uint8_t longKeyJudgeTime;
bit bSecFinishBuzz;
uint8_t timer30m;
bit bFinishBuzz;
uint8_t finishBuzzNum;
uint8_t finishBuzzCycle;

uint8_t liuChengTime;
uint8_t step;
bit steps;
bit bWorkTimeDec;
uint8_t holdWorkTime;
uint8_t AdBuzzNum;
bit bAdBuzz;
uint8_t keyAddTime;
uint8_t startTime;
bit bUpdateCurTemp;
bit bSelfCheck;
bit bSelfCheckSure;
uint8_t check1;
uint8_t check2;
uint8_t check3;
uint8_t check4;
uint8_t check5;
#else
extern	uint8_t check1;
extern uint8_t check2;
extern uint8_t check3;
extern uint8_t check4;
extern uint8_t check5;
extern bit bSelfCheck;
extern bit bSelfCheckSure;
extern bit bUpdateCurTemp;
extern uint8_t startTime;
	extern uint8_t keyAddTime;
extern	uint8_t AdBuzzNum;
extern bit bAdBuzz;
extern uint8_t liuChengTime;
extern uint8_t step;
extern bit steps;
extern bit bWorkTimeDec;
extern uint8_t holdWorkTime;
extern bit bSecFinishBuzz;
extern uint8_t timer30m;
extern bit bFinishBuzz;
extern uint8_t finishBuzzNum;
extern uint8_t finishBuzzCycle;
extern uint8_t longKeyHoldTime;
extern uint8_t longKeyValue;
extern bit bKeyTemp;
extern uint8_t keyValueNum;
extern uint8_t holdKeyValue;
extern uint8_t longKeyJudgeTime;
extern bit bSecFlash500ms;
extern uint8_t flashFunctionTime;
extern bit bPowerOnOff;
extern bit bFunctionSure;
extern uint16_t workTime;
extern uint16_t minWorkTime;
extern uint16_t maxWorkTime;
extern int8_t function;
extern uint8_t  timer1m;
extern uint8_t timer40ms;
extern uint8_t timer500ms;
extern uint8_t timer1s;
extern uint8_t clockAddTime;
#endif
void   FinishDisplay();
void LiuCheng();
void FunctionPaoDou(uint8_t temp1 ,uint8_t temp2 ,uint8_t temp3);
void FunctionZhengDou();
void FuinctionGeShuiDun();
void  Cycle(uint8_t time1,uint8_t time2);
//void FunctionFaJiao();
	void timerControl() ;
	void FunctionChoice();
	void Jia();
	void Jian();
	void FunctionOnOff();
	void LED();
void	  PowerOff();
void FinishBuzz();
	void SelfCheck();
#endif
